﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp3
{
    class Square:Shape
    {
        private double sideLen;

        public double SideLen
        {
            get { return this.sideLen; }
            set { this.sideLen = value; }
        }
        public override void GetArea(int sideLen)
        {
            Console.WriteLine("请输入正方形的边长");
            this.sideLen = double.Parse(Console.ReadLine());
            double area = sideLen * sideLen;
            Console.WriteLine("正方形的面积是" + area);
        }
    }
}
